package com.it.day2;

import java.util.Random;

/**
 * ClassName: InitializationTest2
 * Description: 测试静态字段的显式赋值哪些是解析阶段，哪些是初始化阶段赋值的。
 *
 * @Author: csx
 * @Create: 2025/4/25 - 10:12
 * @version: v1.0
 */
public class InitializationTest2 {
//    public static int a = 1;    //在初始化阶段赋值
//    public static final int INT_CONSTANT = 10;     //在链接阶段的准备环境赋值

//    public static Integer INTEGER_CONSTANT1 = Integer.valueOf(100);     //在初始化阶段赋值
//    public static final Integer INTEGER_CONSTANT2 = Integer.valueOf(100);   //在初始化阶段赋值

//    public static final String s0 = "helloworld0";      //在链接阶段的准备环境赋值
//    public static final String s1 = new String("helloworld1");      //在初始化阶段赋值

//    public static String s2 = "helloworld2";        //在初始化阶段赋值

    public static final int NUM1 = new Random().nextInt(10);        //在初始化阶段赋值
}
